import request from '@/utils/axios';

/**
 * 登录
 */

interface IResponseType<P = {}> {
    code?: number;
    msg: string;
    data: P;
}

export const login = (username: string,password: string,loginType: string) => {
    return request<IResponseType>({
        url: 'login',
        method: 'post',
        data: {username,password,loginType}
    });
};
export const test = ()=>{
    return request<IResponseType>({
        url: 'test',
        method: 'get'
    })
}